const Reqman = require('reqman');

//创建超级管理员
const req = new Reqman({
    baseUrl: "http://127.0.0.1:7011"
});

let user = {
    nickname: "刺梨之家小编",
    email: 'super@qq.com',
    password: "super99999",
    power: [
        'super',
    ],
    score: 999999
}

req
//注册操作
.push(function() {
    return {
    method: "POST",
    url: '/api/user/super',
    data: user
}})
.push(function() {
    return {
    method: "POST",
    url: '/api/login',
    data: user,
    after: function (result) {
        let body = JSON.parse(result.body);
        console.log(body);
    }
}})
.do(function() {

})